﻿<%@ Page Language="C#" AutoEventWireup="false" CodeBehind="ApprovedList.aspx.cs" Inherits="ASB.CC.Web.EZVisit.View.ApprovedList" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Register TagPrefix="uc1" TagName="PageNavigation" Src="~/UserControls/PageNavigation.ascx" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>EZVisit End Requests List</title>
    <link href="../../css/global.css" type="text/css" rel="stylesheet" />
    <link href="../../css/ezform.css" rel="stylesheet" type="text/css" />

    <script src="../../js/jquery-1.4.4.min.js" type="text/javascript"></script>

</head>
<body class="purple-bg">
    <form id="Form1" method="post" runat="server">
    <uc1:PageNavigation ID="PageNavigation1" runat="server"></uc1:PageNavigation>
    <div class="tab-box purplebg_dark">
        <ul class="tab-pos">
            <li><span class="tab-active">Approved 审批通过</span></li>
        </ul>
    </div>
    <div class="fw formbox txt_align_rgt">
        <asp:Button ID="btnExport" runat="server" Text="Export to Excel (导出)" CssClass="btn"></asp:Button>
    </div>
    <asp:DataGrid ID="dgTaskList" ShowHeader="True" AutoGenerateColumns="False" GridLines="both" runat="server" PageSize="10"
        AllowPaging="True" PagerStyle-Visible="False" AllowSorting="True" CssClass="tablestyle">
        <ItemStyle CssClass="tbody trwhitebg" />
        <AlternatingItemStyle CssClass="tbody trpurplebg" />
        <HeaderStyle CssClass="thead" />
        <Columns>
            <asp:TemplateColumn HeaderText="Application No.<br/> 申请单号" SortExpression="AppNo">
                <ItemTemplate>
                    <a href="#" title="Open Application(打开申请单)" onclick="return openWindow('../EZVRequest.aspx?id=<%# DataBinder.Eval(Container.DataItem,"AppID") %>')">
                        <%# DataBinder.Eval(Container.DataItem,"AppNo") %></a>
                </ItemTemplate>
            </asp:TemplateColumn>
            <asp:TemplateColumn HeaderText="EZVisit No.<br/>EZVisit单号" SortExpression="EZVisitReqNo">
                <ItemTemplate>
                    <a href="#" title="Open Application(打开申请单)" onclick="return openWindow('../ezvrequest.aspx?ID=<%# DataBinder.Eval(Container.DataItem,"AppID") %>')">
                        <%# DataBinder.Eval(Container.DataItem, "EZVisitReqNo")%></a>
                </ItemTemplate>
            </asp:TemplateColumn>
            <asp:BoundColumn DataField="RequesterNameEN" HeaderText="Applicant<br/> 申请人" SortExpression="RequesterNameEN" />
            <asp:BoundColumn DataField="CATBranch" HeaderText="CAT/Branch<br/>总部/分公司" SortExpression="CATBranch" />
            <asp:BoundColumn DataField="Company" HeaderText="Customer Company<br/> 客户公司" SortExpression="Company" />
            <asp:BoundColumn DataField="RequestedDateFrom" HeaderText="Begin Date<br/> 开始时间" SortExpression="RequestedDateFrom" DataFormatString="{0:M/d/yyyy}" />
            <asp:BoundColumn DataField="RequestedDateTo" HeaderText="End Date<br/> 结束时间" SortExpression="RequestedDateTo" DataFormatString="{0:M/d/yyyy}" />
            <asp:BoundColumn DataField="CurrentApprover" HeaderText="Current Actor<br/> 当前操作人" SortExpression="CurrentApprover" Visible="false" />
            <asp:BoundColumn DataField="CurrentStep" HeaderText="Step<br/> 操作步骤" SortExpression="CurrentStep" Visible="false" />
        </Columns>
    </asp:DataGrid>
    <div class="fw padding5 txt_align_rgt">
        <span class="float_lft">Total Records:
            <asp:Label ID="lblRecordCount" runat="server" />
            &nbsp;&nbsp;&nbsp;<img src="../../images/book_open.gif" alt="Page (页码)" title="Page (页码)" />&nbsp;Page:
            <asp:Label ID="lblCurrentPageIndex" runat="server" />&nbsp;/&nbsp;
            <asp:Label ID="lblPageCount" runat="server" />
        </span><span>
            <asp:ImageButton ID="btnPageFirst" runat="server" ImageUrl="~/images/pg_first_inact.gif" ImageAlign="AbsMiddle" ToolTip="First Page (第一页)" />
            &nbsp;
            <asp:ImageButton ID="btnPagePrev" runat="server" ImageUrl="~/images/pg_pre_inact.gif" ImageAlign="AbsMiddle" ToolTip="Prev Page (上一页)" />
            &nbsp;
            <asp:ImageButton ID="btnPageNext" runat="server" ImageUrl="~/images/pg_next.gif" ImageAlign="absmiddle" ToolTip="Next Page (下一页)" />
            &nbsp;
            <asp:ImageButton ID="btnPageLast" runat="server" ImageUrl="~/images/pg_last.gif" ImageAlign="absmiddle" ToolTip="Last Page (最后一页)" />
            &nbsp; Go To Page:
            <asp:TextBox ID="txtPage" runat="server" onmouseover="this.className='txtboxover width40';" onmouseout="this.className='txtbox width40';"
                CssClass="txtbox width40" />
            <asp:ImageButton ID="btnGotoPage" runat="server" ImageUrl="~/images/book_open.gif" ToolTip="Goto Page (转到)" /></span>
    </div>
    </form>

    <script type="text/javascript">
        $(function() {
            $('#<%= this.dgTaskList.ClientID %> .trwhitebg').mouseover(function() {
                $(this).removeClass('trwhitebg');
                $(this).addClass('trhover');
            }).mouseout(function() {
                $(this).removeClass('trhover');
                $(this).addClass('trwhitebg')
            });
            $('#<%= this.dgTaskList.ClientID %> .trpurplebg').mouseover(function() {
                $(this).removeClass('trpurplebg');
                $(this).addClass('trhover');
            }).mouseout(function() {
                $(this).removeClass('trhover');
                $(this).addClass('trpurplebg');
            })
        });

        function openWindow(url) {
            var w = screen.availWidth - 100;
            var h = screen.availHeight - 100;
            var top = 50;
            var left = 40;
            var title = 'win' + url.substr(url.indexOf('?') + 1).replace('=', '');
            window.open(url, title.toLowerCase(), 'scrollbars=yes,width=' + w + ',height=' + h + ',top=' + top + ',left=' + left + ',resizable=yes');
            return false;
        }
    </script>

</body>
</html>